<template>
  <div  @click="clickTop">
<van-icon name="back-top" size="40" />
  </div>
</template>

<script>
  export default {
    methods: {
       // 返回顶部
    clickTop(){
       scrollTo(0,0);
    }
    },
  }
</script>

<style lang="scss" scoped>
div{
   position: fixed;
  right: 15px;
  bottom: 100px;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background-color:#fff;
 box-shadow:   7px 7px 29px #cbcccd, 
             -7px -7px 29px #ffffff;
  text-align: center;
  line-height: 40px;
}
</style>